<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Reporte Compra</title>

<link href="estilacho.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
	color: #993300;
	text-decoration: none;
}
a:visited {
	color: #993300;
	text-decoration: none;
}
a:active {
	color: #FF0000;
	text-decoration: none;
}
a:hover {
	text-decoration: none;
	color: #993300;
}
-->
</style></head>

<body>
<p align="center">
  <?
	extract($_POST);
    extract($_GET);
    //$base= "ucg - copia";
	//$conexion = mysql_connect("localhost","root","");
		//mysql_select_db($base,$conexion);
	include 'conexion.php';
       	$sqla="SELECT DISTINCT DATE_FORMAT(fecha,'%Y') from compra1";
	$resultadoa = mysql_query($sqla, $conexion);
	
	
	?>
</p>
<form id="form1" name="form1" method="post" action="consulta_compra_gen1.php">
  <table width="100%" border="0" class="tablainstitucion" align="center">
    <tr>
      <th colspan="4">Reporte Orden de Compra</th>
    </tr>
    <tr>
      <td width="19%">Seleccione un Ano: </td>
      <td width="24%"><span class="style7">
        <select name="ano" class="combobox" id="ano">
          <option value="">Seleccione un Ano:</option>
          <? while ($busqueda = mysql_fetch_array($resultadoa)) { ?>
          <option value="<? echo $busqueda[0]; ?>"><? echo $busqueda[0];?> </option>
          <? }  ?>
        </select>
      </span></td>
      <td width="22%">Seleccione el Tipo</td>
      <td width="35%"><span class="style7">
        <select name="tipo" class="combobox" id="tipo">
          <option value="">Seleccione un tipo</option>
          <option value="1">Compra</option>
          <option value="2">Servicio</option>
          <option value="3">Interna</option>
          <option value="4">Administracion</option>
          <? while ($busqueda = mysql_fetch_array($resultadoa)) { ?>
          <? }  ?>
                        </select>
      </span></td>
    </tr>
    <tr>
      <td colspan="4">&nbsp;</td>
    </tr>
  </table>
  <div align="center">
        <input name="Submit" type="submit" class="boton" value="Buscar">      
      </div>
</form>
<div align="center">
  <a href="ordencompra.php">Regresar
</a></div>
</body>
</html>
